home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / include / incl98.zoo / minimal.h < prev    next >
C/C++ Source or Header  |  1994-02-22  |  1KB  |  84 lines

  1. #ifndef _COMPILER_H
  2. #include <compiler.h>
  3. #endif
  4.  
  5. #ifndef _OSBIND_H
  6. #include <osbind.h>
  7. #endif
  8.  
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12.  
  13. int errno;
  14. #ifndef __MINT__
  15. int _console_dev = 2;
  16. #endif
  17.  
  18. #ifndef __MINT__
  19.  
  20. __EXTERN __EXITING __exit __PROTO((long)) __NORETURN; /* def in crt0.c */
  21. int       raise    __PROTO((int sig));
  22. void     _exit  __PROTO((int status));
  23.  
  24. void _exit(status)
  25.     int status;
  26. {
  27.     __exit((long)status);
  28. }
  29.  
  30. int
  31. raise(sig)
  32. int sig;
  33. {
  34.     return 0;
  35. }
  36.  
  37. #else
  38.  
  39. __EXTERN __EXITING _exit __PROTO((int)) __NORETURN;
  40. #define __exit _exit
  41.  
  42. #endif /* __MINT__ */
  43.  
  44. void     _init_signal __PROTO((void));
  45. void      exit  __PROTO((int status));
  46. void     _main  __PROTO((long argc, char **argv, char **environ));
  47. void __main __PROTO ((void));
  48.  
  49. /* vector giving which signals are currently blocked from delivery (for TOS) */
  50. long _sigmask;
  51.  
  52. /* vector giving an indication of which signals are currently pending (for TOS) */
  53. long _sigpending;
  54.  
  55. void
  56. _init_signal()
  57. {
  58. }
  59.  
  60. __EXITING
  61. exit(status)
  62.     int status;
  63. {
  64.     __exit(status);
  65. }
  66.  
  67. void __main ()
  68. {
  69. }
  70.  
  71. void _main(argc, argv, environ)
  72.     long argc;
  73.     char **argv;
  74.     char **environ;
  75. {
  76.     /* Avoid prototyping main, it will conflict with user's version */
  77.     __EXTERN int main ();
  78.     exit(main((int)argc, argv, environ));
  79. }
  80.  
  81. #ifdef __cplusplus
  82. }
  83. #endif
  84.